x11: Make sure stream stays alive long enough
authorBenjamin Otte <otte@redhat.com>
Fri, 5 Jul 2019 18:55:54 +0000 (20:55 +0200)
committerBenjamin Otte <otte@redhat.com>
Fri, 5 Jul 2019 19:17:00 +0000 (21:17 +0200)
commit96b782c026fe026dda0b2c61dcb7cb50f4aa828c
tree63102047df2c192e54d7ebe44a07ee78a05b6b7c
parent6455a54f6c9689c0d1c79af1de00c962818084e2
x11: Make sure stream stays alive long enough

When unreffing the stream from a different thread, the close function
will schedule its cleanup asynchornously in the main thread.
We need to make sure the stream object stays alive for as long as
that hasn't happened, so ref() it.

Fixes #2003
gdk/x11/gdkselectionoutputstream-x11.c